package com.acctrue.zentao.commit;

import com.acctrue.zentao.ui.ZentaoTaskUi;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

/**
 * @author : sunjj
 * @createTime : 2023/8/20
 */
public class ZentaoTaskDialog extends DialogWrapper {
    private final ZentaoTaskUi panel;

    public ZentaoTaskDialog(@Nullable Project project) {
        super(project);
        panel = new ZentaoTaskUi(this);
        setTitle("Commit");
        setOKButtonText("OK");
        init();
    }

    @Override
    protected @Nullable JComponent createCenterPanel() {
        return panel.getMainPanel();
    }

    public String getCommitMessage() {
        return panel.getCommitMessage();
    }
}
